package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.TreeSet;

import javax.swing.JTable;

import dataLayer.DAOAbsence;
import model.Absence;
import model.Teacher;
import view.PanelTeacherDetails;

public class DeleteAbsenceTeacher implements ActionListener {

	private Teacher T;
	private PanelTeacherDetails PTD;
	private TreeSet<Absence> absenceList = new TreeSet<Absence>();
	
	public DeleteAbsenceTeacher(PanelTeacherDetails panelteacherdetails, Teacher t) {
		this.setPTD(PTD);
		absenceList = DAOAbsence.getInstance().loadAbsenceFromTeacher(t);
	
		this.T = t;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		JTable TeacherAbsences = PTD.getAbsenceList();

		int absence_id = (int) TeacherAbsences.getModel().getValueAt(TeacherAbsences.getSelectedRow(), 5);
		System.out.println( "eerde row dus hierbij het Id:" +absence_id);
		
	}
	

	
	
	
	
	
	
	
	public PanelTeacherDetails getPTD() {
		return PTD;
	}

	public void setPTD(PanelTeacherDetails pTD) {
		PTD = pTD;
	}



}
